var res = []
var arr = [1,1,2,2,3,3]
let obj = {}
for(let i = 0,len = arr.length;i < len;i++) {
    obj[arr[i]] = true
}
for(let i in obj) {
    res.push(i)
}
console.log(res);